package samples.d2.trames 
{
	import samples.BaseSample;
	import shapes.shapes2D.distribution.goldenRatio.GoldenRatio;
	import shapes.shapes2D.Dot;
	
	/**
	 * @author Nicolas Barradeau
	 * http://en.nicoptere.net
	 */
	public class GoldenRatio0 extends BaseSample
	{
		
		public function GoldenRatio0() 
		{
			
			graphics.beginFill( color );
			
			var d:Dot = new Dot();
			var total:int = 1000;
			var radius:Number = 1;
			
			for ( var i:int = 0; i < total; i++ )
			{
				
				radius += GoldenRatio.RATIO * .2;
				d.x = sw / 2 + Math.cos( GoldenRatio.RATIO * i ) * radius;
				d.y = sh / 2 + Math.sin( GoldenRatio.RATIO * i ) * radius;
				d.draw( graphics );
				
			}
			
		}
		
	}

}